using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;

namespace DALTMClient
{
    public partial class frmSmileys : Form
    {
        public frmSmileys()
        {
            InitializeComponent();
        }

        private void frmSmileys_Load(object sender, EventArgs e)
        {
            try
            {
                foreach (PictureBox ct in Controls)
                { 
                    int k=-1;
                    string tmp = ct.Name.Substring(ct.Name.Length-2);
                    if(tmp.Substring(tmp.Length-2,1)=="x")
                        k=int.Parse(tmp.Substring(tmp.Length-1));
                    else k = int.Parse(tmp);
                    if(k<=32 && k>0)
                        ct.Image = Image.FromFile(frmSendMessenger.smileys[k-1]);
                    ct.Cursor = Cursors.Hand;            
                                        
                }
            }
            catch
            {
            }
        }

        private void pictureBox1_MouseHover(object sender, EventArgs e)
        {
            pictureBox1.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            pictureBox1.BackColor = Color.Transparent;
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[1];
            Close();
        }

        private void pictureBox2_MouseHover(object sender, EventArgs e)
        {
            pictureBox2.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox2_MouseLeave(object sender, EventArgs e)
        {
            pictureBox2.BackColor = Color.Transparent;
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[2];
            Close();
        }

        private void pictureBox3_MouseHover(object sender, EventArgs e)
        {
            pictureBox3.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox3_MouseLeave(object sender, EventArgs e)
        {
            pictureBox3.BackColor = Color.Transparent;
        }

        private void pictureBox4_MouseLeave(object sender, EventArgs e)
        {
            pictureBox4.BackColor = Color.Transparent;
        }

        private void pictureBox5_MouseLeave(object sender, EventArgs e)
        {
            pictureBox5.BackColor = Color.Transparent;
        }

        private void pictureBox6_MouseLeave(object sender, EventArgs e)
        {
            pictureBox6.BackColor = Color.Transparent;
        }

        private void pictureBox7_MouseLeave(object sender, EventArgs e)
        {
            pictureBox7.BackColor = Color.Transparent;
        }

        private void pictureBox8_MouseLeave(object sender, EventArgs e)
        {
            pictureBox8.BackColor = Color.Transparent;
        }

        private void pictureBox9_MouseLeave(object sender, EventArgs e)
        {
            pictureBox9.BackColor = Color.Transparent;
        }

        private void pictureBox10_MouseLeave(object sender, EventArgs e)
        {
            pictureBox10.BackColor = Color.Transparent;
        }

        private void pictureBox11_MouseLeave(object sender, EventArgs e)
        {
            pictureBox11.BackColor = Color.Transparent;
        }

        private void pictureBox12_MouseLeave(object sender, EventArgs e)
        {
            pictureBox12.BackColor = Color.Transparent;
        }

        private void pictureBox13_MouseLeave(object sender, EventArgs e)
        {
            pictureBox13.BackColor = Color.Transparent;
        }

        private void pictureBox14_MouseLeave(object sender, EventArgs e)
        {
            pictureBox14.BackColor = Color.Transparent;
        }

        private void pictureBox15_MouseLeave(object sender, EventArgs e)
        {
            pictureBox15.BackColor = Color.Transparent;
        }

        private void pictureBox16_MouseLeave(object sender, EventArgs e)
        {
            pictureBox16.BackColor = Color.Transparent;
        }

        private void pictureBox17_MouseLeave(object sender, EventArgs e)
        {
            pictureBox17.BackColor = Color.Transparent;
        }

        private void pictureBox_MouseLeave(object sender, EventArgs e)
        {
            pictureBox18.BackColor = Color.Transparent;
        }

        private void pictureBox19_MouseLeave(object sender, EventArgs e)
        {
            pictureBox19.BackColor = Color.Transparent;
        }

        private void pictureBox20_MouseLeave(object sender, EventArgs e)
        {
            pictureBox20.BackColor = Color.Transparent;
        }

        private void pictureBox21_MouseLeave(object sender, EventArgs e)
        {
            pictureBox21.BackColor = Color.Transparent;
        }

        private void pictureBox22_MouseLeave(object sender, EventArgs e)
        {
            pictureBox22.BackColor = Color.Transparent;
        }

        private void pictureBox23_MouseLeave(object sender, EventArgs e)
        {
            pictureBox23.BackColor = Color.Transparent;
        }

        private void pictureBox24_MouseLeave(object sender, EventArgs e)
        {
            pictureBox24.BackColor = Color.Transparent;
        }

        private void pictureBox25_MouseLeave(object sender, EventArgs e)
        {
            pictureBox25.BackColor = Color.Transparent;
        }

        private void pictureBox26_MouseLeave(object sender, EventArgs e)
        {
            pictureBox26.BackColor = Color.Transparent;
        }

        private void pictureBox27_MouseLeave(object sender, EventArgs e)
        {
            pictureBox27.BackColor = Color.Transparent;
        }

        private void pictureBox28_MouseLeave(object sender, EventArgs e)
        {
            pictureBox28.BackColor = Color.Transparent;
        }

        private void pictureBox29_MouseLeave(object sender, EventArgs e)
        {
            pictureBox29.BackColor = Color.Transparent;
        }

        private void pictureBox30_MouseLeave(object sender, EventArgs e)
        {
            pictureBox30.BackColor = Color.Transparent;
        }

        private void pictureBox31_MouseLeave(object sender, EventArgs e)
        {
            pictureBox31.BackColor = Color.Transparent;
        }

        private void pictureBox32_MouseLeave(object sender, EventArgs e)
        {
            pictureBox32.BackColor = Color.Transparent;
        }

        private void pictureBox4_MouseHover(object sender, EventArgs e)
        {
            pictureBox4.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox5_MouseHover(object sender, EventArgs e)
        {
            pictureBox5.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox6_MouseHover(object sender, EventArgs e)
        {
            pictureBox6.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox7_MouseHover(object sender, EventArgs e)
        {
            pictureBox7.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox8_MouseHover(object sender, EventArgs e)
        {
            pictureBox8.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox9_MouseHover(object sender, EventArgs e)
        {
            pictureBox9.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox10_MouseHover(object sender, EventArgs e)
        {
            pictureBox10.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox11_MouseHover(object sender, EventArgs e)
        {
            pictureBox11.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox12_MouseHover(object sender, EventArgs e)
        {
            pictureBox12.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox13_MouseHover(object sender, EventArgs e)
        {
            pictureBox13.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox14_MouseHover(object sender, EventArgs e)
        {
            pictureBox14.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox15_MouseHover(object sender, EventArgs e)
        {
            pictureBox15.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox16_MouseHover(object sender, EventArgs e)
        {
            pictureBox16.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox17_MouseHover(object sender, EventArgs e)
        {
            pictureBox17.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox18_MouseHover(object sender, EventArgs e)
        {
            pictureBox18.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox18_MouseLeave(object sender, EventArgs e)
        {
            pictureBox18.BackColor = Color.Transparent;
        }

        private void pictureBox19_MouseHover(object sender, EventArgs e)
        {
            pictureBox19.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox20_MouseHover(object sender, EventArgs e)
        {
            pictureBox20.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox21_MouseHover(object sender, EventArgs e)
        {
            pictureBox21.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox22_MouseHover(object sender, EventArgs e)
        {
            pictureBox22.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox23_MouseHover(object sender, EventArgs e)
        {
            pictureBox23.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox24_MouseHover(object sender, EventArgs e)
        {
            pictureBox24.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox25_MouseHover(object sender, EventArgs e)
        {
            pictureBox25.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox26_MouseHover(object sender, EventArgs e)
        {
            pictureBox26.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox27_MouseHover(object sender, EventArgs e)
        {
            pictureBox27.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox28_MouseHover(object sender, EventArgs e)
        {
            pictureBox28.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox29_MouseHover(object sender, EventArgs e)
        {
            pictureBox29.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox30_MouseHover(object sender, EventArgs e)
        {
            pictureBox30.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox31_MouseHover(object sender, EventArgs e)
        {
            pictureBox31.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox32_MouseHover(object sender, EventArgs e)
        {
            pictureBox32.BackColor = Color.DeepSkyBlue;
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[0];
            Close();
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[3];
            Close();
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[4];
            Close();
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[5];
            Close();
        }

        private void pictureBox7_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[6];
            Close();
        }

        private void pictureBox8_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[7];
            Close();
        }

        private void pictureBox9_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[8];
            Close();
        }

        private void pictureBox10_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[9];
        }

        private void pictureBox11_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[10];
            Close();
        }

        private void pictureBox12_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[11];
            Close();
        }

        private void pictureBox13_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[12];
            Close();
        }

        private void pictureBox14_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[13];
            Close();
        }

        private void pictureBox15_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[14];
            Close();
        }

        private void pictureBox16_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[15];
            Close();
        }

        private void pictureBox17_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[16];
            Close();
        }

        private void pictureBox18_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[17];
            Close();
        }

        private void pictureBox19_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[18];
            Close();
        }

        private void pictureBox20_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[19];
            Close();
        }

        private void pictureBox21_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[20];
            Close();
        }

        private void pictureBox22_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[21];
            Close();
        }

        private void pictureBox23_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[22];
            Close();
        }

        private void pictureBox24_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[23];
            Close();
        }

        private void pictureBox25_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[24];
            Close();
        }

        private void pictureBox26_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[25];
            Close();
        }

        private void pictureBox27_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[26];
            Close();
        }

        private void pictureBox28_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[27];
            Close();
        }

        private void pictureBox29_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[28];
            Close();
        }

        private void pictureBox30_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[29];
            Close();
        }

        private void pictureBox31_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[30];
            Close();
        }

        private void pictureBox32_Click(object sender, EventArgs e)
        {
            frmSendMessenger.symbol = frmSendMessenger.symbols[31];
            Close();
        }       
    }
}